package com.kwlt.smc.entity;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
import org.springside.modules.utils.Collections3;

import com.google.common.collect.Lists;

/**
 * 用户
 * @author xushunxin
 *
 */

@Entity
@Table(name="USER")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class User {
	/**
	 * 用户主键
	 */
	private Long userId;
	/**
	 * 用户名称
	 */
	private String userName;
	/**
	 * 登录名称
	 */
	private String loginName;
	/**
	 * 用户密码
	 */
	private String password;
	/**
	 * 用户邮箱
	 */
	private String email;
	/**
	 * 用户授权码
	 */
	private String userAuthCode;
	/**
	 * 扩展码
	 */
	private String expaCode;
	/**
	 * IP地址
	 */
	private String ipAddress;
	/**
	 * 状态回调地址
	 */
	private String statusCallbackAddr;
	/**
	 * 短信上行回调地址
	 */
	private String smsUpCallbackAddr;
	/**
	 * 返回格式
	 */
	private String backFormat;
	/**
	 * 签名
	 */
	private String signature;
	/**
	 * 是否过滤黑名单
	 */
	private String isFilterBlack;
	/**
	 * 是否过滤关键字
	 */
	private String isFilterKey;
	/**
	 * 用户编号
	 */
	private String userNumbers;
	/**
	 * 是否校验
	 */
	private String isMd5;
	/**
	 * 用户状态
	 */
	private String status;
	
	private String isIp;
	
	/**
	 * 签名类型
	 */
	private String signatureType;
	
	/**
	 * 移动签名
	 */
	private String mobileSignature;
	/**
	 * 电信签名
	 */
	private String telecomSignature;
	/**
	 * 联通签名
	 */
	private String unicomSignature;
	/**
	 * 用户类型 Y:预付费 H后付费
	 */
	private String userType;
	
	/**
	 * 提交号码最小个数
	 */
	private Long minPhoneNumbers;
	/**
	 * 提交号码最大个数
	 */
	private Long maxPhoneNumbers;
	/**
	 * 用户类别
	 * 营销、直客等
	 */
	private String userCategory;
	/**
	 * 企业ID
	 */
	private Long cpId;
	/**
	 * 是否过滤号段
	 */
	private String isFilterPhone;
	/**
	 * 省份编码
	 */
	private String provCode;
	public User(){
		
	}
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}
	@Column(nullable=false,length = 50)
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}
	@Column(nullable=false,length = 50)
	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	@Column(nullable=false,length = 50)
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	@Column(nullable=false,length = 50)
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	
	@Column(length = 50)
	public String getUserAuthCode() {
		return userAuthCode;
	}

	public void setUserAuthCode(String userAuthCode) {
		this.userAuthCode = userAuthCode;
	}
	@Column(length = 50)
	public String getExpaCode() {
		return expaCode;
	}

	public void setExpaCode(String expaCode) {
		this.expaCode = expaCode;
	}

	@Column(length = 50)
	public String getIpAddress() {
		return ipAddress;
	}

	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}

	@Column(length = 512)
	public String getStatusCallbackAddr() {
		return statusCallbackAddr;
	}

	public void setStatusCallbackAddr(String statusCallbackAddr) {
		this.statusCallbackAddr = statusCallbackAddr;
	}

	@Column(length = 512)
	public String getSmsUpCallbackAddr() {
		return smsUpCallbackAddr;
	}

	public void setSmsUpCallbackAddr(String smsUpCallbackAddr) {
		this.smsUpCallbackAddr = smsUpCallbackAddr;
	}

	@Column(length = 50)
	public String getBackFormat() {
		return backFormat;
	}

	public void setBackFormat(String backFormat) {
		this.backFormat = backFormat;
	}

	@Column(length = 1000)
	public String getSignature() {
		return signature;
	}

	public void setSignature(String signature) {
		this.signature = signature;
	}

	@Column(length = 5)
	public String getIsFilterBlack() {
		return isFilterBlack;
	}

	public void setIsFilterBlack(String isFilterBlack) {
		this.isFilterBlack = isFilterBlack;
	}

	@Column(length = 5)
	public String getIsFilterKey() {
		return isFilterKey;
	}

	public void setIsFilterKey(String isFilterKey) {
		this.isFilterKey = isFilterKey;
	}

	@Column(length = 50)
	public String getUserNumbers() {
		return userNumbers;
	}

	public void setUserNumbers(String userNumbers) {
		this.userNumbers = userNumbers;
	}
	@Column(length = 5)
	public String getIsMd5() {
		return isMd5;
	}

	public void setIsMd5(String isMd5) {
		this.isMd5 = isMd5;
	}
	@Column(length = 5)
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	@Column(length = 5)
	public String getIsIp() {
		return isIp;
	}

	public void setIsIp(String isIp) {
		this.isIp = isIp;
	}
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

	public String getSignatureType() {
		return signatureType;
	}

	public void setSignatureType(String signatureType) {
		this.signatureType = signatureType;
	}

	public String getMobileSignature() {
		return mobileSignature;
	}

	public void setMobileSignature(String mobileSignature) {
		this.mobileSignature = mobileSignature;
	}

	public String getTelecomSignature() {
		return telecomSignature;
	}

	public void setTelecomSignature(String telecomSignature) {
		this.telecomSignature = telecomSignature;
	}

	public String getUnicomSignature() {
		return unicomSignature;
	}

	public void setUnicomSignature(String unicomSignature) {
		this.unicomSignature = unicomSignature;
	}

	public String getUserType() {
		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}

	public Long getCpId() {
		return cpId;
	}

	public void setCpId(Long cpId) {
		this.cpId = cpId;
	}

	public Long getMinPhoneNumbers() {
		return minPhoneNumbers;
	}

	public void setMinPhoneNumbers(Long minPhoneNumbers) {
		this.minPhoneNumbers = minPhoneNumbers;
	}

	public Long getMaxPhoneNumbers() {
		return maxPhoneNumbers;
	}

	public void setMaxPhoneNumbers(Long maxPhoneNumbers) {
		this.maxPhoneNumbers = maxPhoneNumbers;
	}

	public String getUserCategory() {
		return userCategory;
	}

	public void setUserCategory(String userCategory) {
		this.userCategory = userCategory;
	}

	public String getIsFilterPhone() {
		return isFilterPhone;
	}

	public void setIsFilterPhone(String isFilterPhone) {
		this.isFilterPhone = isFilterPhone;
	}

	public String getProvCode() {
		return provCode;
	}

	public void setProvCode(String provCode) {
		this.provCode = provCode;
	}
	
	
}
